﻿<!DOCTYPE html>
<html>
<head lang="en">
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <meta name="description" content="BarCode 通用条码系统 种业" />
    <meta property="qc:admins" content="35611357776672527636" />
    <title>通用条码查询系统</title>
    <style type="text/css">
        
       .t20 {margin-top:20px;}
       .b20{margin-bottom:20px;}  
    </style>
    <link href="\MonkUI\monk.ui.min.css" rel="stylesheet"/>
    <link href="\Content\bootstrap.min.css" rel="stylesheet"/>
</head>
<body class="container">
@*<div class="row t20 b20">
    <h1 class="h1 col-md-4 ">二维码通用查询系统</h1>
</div>*@
<div class="row"></div>
    <form class="monk-form t20" id="feekbackForm" role="form" method="post">
        <div class="monk-form-item">
            <label for="" class="monk-form-label">商品二维码标识</label>
            <div class="monk-form-wrap">
                <span class="monk-iconfont border-right icon-monk-input"></span>
                <input type="text" class="monk-form-input normal" id="smlCode" name="smlCode" placeholder="请输入二维码..."/>
                <span class="monk-iconfont border-left icon-monk-dacha monk-clear-input"></span>
            </div>
            <div class="monk-form-item">
                <label for="" class="monk-form-label"></label>
                <label for="" class="monk-form-label"></label>
                <div class="monk-form-wrap">
                    <span class="monk-iconfont border-right icon-monk-input"></span>
                    <input type="button" class="monk-input-button turquoise monk-form-time-btn" id="btn" value="提交"/>
                    <span class="monk-iconfont border-left icon-monk-dacha monk-clear-input"></span>
                </div>
                <div class="monk-form-tip"></div>
            </div>

        </div>
        <div id="Search" >
                  <div class="monk-form-item">
                      <label for="" id="Result" class="monk-form-label">查询结果：</label>
                      <label for="" class="monk-form-label"></label>
                      <div class="monk-form-wrap">
                          <span class="monk-iconfont border-right icon-monk-input"></span>
                          <input type="text" class="monk-form-input normal" id="productName" name="productName" readonly="readonly" placeholder="品种名称" />
                          <span class="monk-iconfont border-left icon-monk-dacha monk-clear-input"></span>
                      </div>
                      <div class="monk-form-tip"></div>
                  </div>
                  <div class="monk-form-item">
                      <label for="" class="monk-form-label"></label>
                      <div class="monk-form-wrap">
                          <span class="monk-iconfont border-right icon-monk-input"></span>
                          <input type="text" class="monk-form-input normal" id="patch" name="patch" readonly="readonly" placeholder="品种批次" />
                          <span class="monk-iconfont border-left icon-monk-dacha monk-clear-input"></span>
                      </div>
                      <div class="monk-form-tip"></div>
                  </div>
                  <div class="monk-form-item">
                      <label for="" class="monk-form-label"></label>
                      <div class="monk-form-wrap">
                          <span class="monk-iconfont border-right icon-monk-input"></span>
                          <input type="text" class="monk-form-input normal" id="saleInfo" name="saleInfo" readonly="readonly" placeholder="物流码" />
                          <span class="monk-iconfont border-left icon-monk-dacha monk-clear-input"></span>
                      </div>
                      <div class="monk-form-tip"></div>
                  </div>
                  <div class="monk-form-item">
                      <label for="" class="monk-form-label"></label>
                      <div class="monk-form-wrap">
                          <span class="monk-iconfont border-right icon-monk-input"></span>
                          <input type="text" class="monk-form-input normal"id="bigCode" name="bigCode" readonly="readonly" placeholder="物流或销售信息" />
                          <span class="monk-iconfont border-left icon-monk-dacha monk-clear-input"></span>
                      </div>
                      <div class="monk-form-tip"></div>
                  </div>
        </div>  
    </form>
<script src="\Scripts\jquery-1.10.2.min.js"></script>
<script src="\Scripts\bootstrap.min.js"></script>
<script>
    var arr;
    $(function () {
        $("#Search").hide();
        $("#btn").click(function () {
            $("#Search").hide();
            var smlcode = $("#smlCode").val();
            if (smlcode !== "") {
                $.ajax({
                    type: "POST",
                    url: "/Home/Query",
                    data: "{ \"smlCode\":\"" + smlcode + "\" }",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function(msg) {
                        arr = msg;
                        show();
                    },
                    error: function(xhr, msg) {}
                });
            }
        });
    });
    function show() {
        $("#bigCode").val(arr.BigCode);
        $("#patch").val(arr.Patch);
        $("#productName").val(arr.ProductName);
        $("#saleInfo").val(arr.SaleInfo);
        $("#Result").html(arr.Remark);
        $("#Search").show();
    }
</script>
</body>
</html>